how to generate unique string

前端 未结 4 553
广开言路
广开言路 2020-12-20 18:29

I want to transform an XML document into HTML. Some XML elements have links to others documents like:


In the H

4条回答
  •  南笙
    南笙 (楼主)
    2020-11-21 00:54

    You can utilize ARGV:

    v=123test
    awk 'BEGIN {print ARGV[1]}' "$v"
    

    Note that if you are going to continue into the body, you will need to adjust ARGC:

    awk 'BEGIN {ARGC--} {print ARGV[2], $0}' file "$v"
    

提交回复
热议问题